/*
 * Copyright (c) Jupyter Development Team.
 * Distributed under the terms of the Modified BSD License.
 */

/*-----------------------------------------------------------------------------
| Variables
|----------------------------------------------------------------------------*/

:root {
  --jp-private-running-item-height: 24px;
}

/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

.jp-RunningSessions {
  display: flex;
  flex-direction: column;
  min-width: var(--jp-sidebar-min-width);
  color: var(--jp-ui-font-color1);
  background: var(--jp-layout-color1);

  /* This is needed so that all font sizing of children done in ems is
   * relative to this base size */
  font-size: var(--jp-ui-font-size1);
}

.jp-RunningSessions > .jp-SidePanel-toolbar::part(positioning-region) {
  justify-content: flex-end;
}

.jp-RunningSessions-section {
  min-height: 50px;
  overflow: auto;
}

.jp-RunningSessions-sectionContainer {
  margin: 0;
  padding: 0;
}

.jp-RunningSessions-sectionList {
  display: block;
  margin: 0;
  padding: 0;
  list-style-type: none;
  padding-left: 14px;
}

.jp-RunningSessions-item {
  display: flex;
  flex-direction: row;
  color: var(--jp-ui-font-color1);
  height: var(--jp-private-running-item-height);
  line-height: var(--jp-private-running-item-height);
  padding: 0 8px;
}

.jp-RunningSessions-item:hover {
  background-color: var(--jp-layout-color2);
  cursor: pointer;
}

.jp-mod-running-leaf {
  /** Account for lack of collapser */
  margin-left: 16px;
}

.jp-RunningSessions-sectionContainer > .jp-RunningSessions-sectionList {
  padding-left: 0;
}

.jp-RunningSessions-viewButton[aria-pressed='true'] {
  box-shadow: none;
}

.jp-mod-running-list-view .jp-RunningSessions-sectionList {
  padding-left: 0;
}

.jp-mod-running-list-view .jp-mod-running-leaf {
  margin-left: 0;
}

.jp-mod-running-list-view .jp-RunningSessions-item.jp-mod-kernel,
.jp-mod-running-list-view .jp-RunningSessions-item.jp-mod-kernelspec {
  display: none;
}

.jp-RunningSessions-item.jp-mod-kernelspec,
.jp-RunningSessions-item.jp-mod-kernel {
  user-select: none;
}

.jp-RunningSessions-item-label-kernel-id {
  color: var(--jp-ui-font-color3);
}

.jp-RunningSessions-collapseButton {
  margin: 4px 2px;
}

.jp-RunningSessions-collapseButton[aria-pressed='true'] {
  box-shadow: none;
}

.jp-RunningSessions-icon {
  margin: 0 4px;
}

.jp-RunningSessions-toolbar {
  min-width: max-content;
}

img.jp-RunningSessions-icon,
span.jp-RunningSessions-icon > svg {
  width: 16px;
  height: 16px;
}

img.jp-RunningSessions-icon {
  margin-top: 4px;
  object-fit: contain;
}

span.jp-RunningSessions-icon {
  align-items: center;
  display: flex;
}

span.jp-RunningSessions-icon > svg {
  display: block;
  margin: 0 auto;
}

.jp-RunningSessions-itemLabel {
  font-size: var(--jp-ui-font-size1);
  flex: 1 1 55%;
  padding: 0 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.jp-RunningSessions-itemLabel:focus {
  background-color: var(--jp-layout-color2);
}

.jp-RunningSessions-itemDetail {
  font-size: var(--jp-ui-font-size1);
  flex: 1 1 45%;
  padding: 0 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.jp-RunningSessions-caret {
  align-items: center;
  display: flex;
  padding-right: 4px;
}

.jp-RunningSessions-caret > svg {
  height: 16px;
  width: 16px;
}

.jp-RunningSessions-item .jp-RunningSessions-itemShutdown {
  border-radius: 0;
  margin: 0;
}

.jp-RunningSessions-item:not(:hover) .jp-RunningSessions-itemShutdown {
  visibility: hidden;
}

.jp-RunningSessions-sectionList
  .jp-RunningSessions-item
  .jp-Button.jp-RunningSessions-itemShutdown:hover {
  background: var(--jp-layout-color3);
}

.jp-RunningSessions-shutdownAll.jp-ToolbarButtonComponent {
  color: var(--jp-warn-color1);
  background-color: transparent;
  border-radius: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jp-RunningSessions-shutdownAll.jp-ToolbarButtonComponent:hover {
  background-color: var(--jp-layout-color2);
}

.jp-RunningSessions-shutdownAll.jp-ToolbarButtonComponent:focus {
  border: none;
  box-shadow: none;
  background-color: var(--jp-layout-color2);
}

.jp-RunningSessions-shutdownAll.jp-ToolbarButtonComponent[disabled] {
  color: var(--jp-ui-font-color2);
}

.jp-RunningSessions-shutdownAll.jp-ToolbarButtonComponent[disabled]:hover {
  background: none;
}
